package com.frank.oj.service.admin.system;

import cn.hutool.json.JSONObject;
import com.frank.oj.common.exception.StatusFailException;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.model.dto.*;

import java.util.List;

/**
 * @author frank
 * @Date 2024/3/27
 */
public interface ConfigService {
    CommonResult<JSONObject> getServiceInfo();

    CommonResult<List<JSONObject>> getJudgeServiceInfo();

    WebConfigDTO getWebConfig();

    EmailConfigDTO getEmailConfig();

    DBAndRedisConfigDTO getDBAndRedisConfig();

    void deleteHomeCarousel(Long id) throws StatusFailException;

    void setWebConfig(WebConfigDTO config) throws StatusFailException;

    void setEmailConfig(EmailConfigDTO config) throws StatusFailException;

    void setDBAndRedisConfig(DBAndRedisConfigDTO config) throws StatusFailException;

    SwitchConfigDTO getSwitchConfig();

    void setSwitchConfig(SwitchConfigDTO configDTO) throws StatusFailException;

    CommonResult<Void> testEmail(TestEmailDTO testEmailDto);
}
